Skip to content

test(xlsx): wait for the formula bar to snap to a whole line - #13

Merged
pierreneter merged 1 commit into
p10node:mainfrom
mkroemer:test-formula-bar-snap
Nov 17, 2026
Merged

pierreneter merged 1 commit into
p10node:mainfrom
mkroemer:test-formula-bar-snap

Conversation

@mkroemer

Copy link
Copy Markdown
Contributor

The formula bar test in e2e/xlsx.spec.ts fails now and then in CI with Expected: 2, Received: 1.7666….

The bar rounds its scroll position to a whole line in its scroll handler, which runs a frame after the browser scrolled the caret into view. The test read scrollTop right after typing, and sometimes saw the browser's partial scroll (1.77 lines instead of 2). It now waits up to 2 s for the snap before asserting. Only the test changes.

🤖 Generated with Claude Code

The bar rounds its scroll position to a whole line in its scroll handler, which runs a frame after the browser scrolled the caret into view. The test read scrollTop right after typing and sometimes saw the browser's partial scroll (1.77 lines instead of 2); it now waits up to 2 s for the snap before asserting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pierreneter pierreneter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for tracking this flake down.

Approved. Test only, and the explanation matches what CI showed (1.7666... instead of 2).

Tiny nit, no need to change: the lines helper could be reused inside waitForFunction in place of the repeated expression.

@pierreneter
pierreneter merged commit 17336aa into p10node:main Nov 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants